<!doctype HTML>
<html>

<head>
  <meta charset="UTF-8">
  <meta content="True" name="HandheldFriendly">
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
  <meta name="theme-color" content="#fff">
  <meta name="theme-color" content="#1c1c1e" media="(prefers-color-scheme: dark)">
  <title>Preview</title>
  <style>
    :root {
      --background-color: transparent;
      --foreground-color: #000;
      --link-color: #336bad;
      --foreground-secondary-color: #666;
      --border-color: #e2e2e2;
      --code-background-color: #f8f8f8;
    }

    @media (prefers-color-scheme: dark) {
      :root {
        --background-color: transparent;
        --foreground-color: #fff;
        --link-color: #6699ff;
        --foreground-secondary-color: #adadaf;
        --border-color: #2b2b2d;
        --code-background-color: #2b2b2d;
      }
    }

    html {
      padding: 0;
      margin: 0;
    }

    body {
      background-color: var(--background-color);
      padding: 10px;
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
      font-size: 14px;
    }

    h1 {
      color: var(--foreground-color);
      font-size: 2em;
    }

    hr {
      border: none;
      height: 2px;
      color: var(--border-color);
      background-color: var(--border-color);
      margin-top: 1em;
      margin-bottom: 1em;
    }

    a:link,
    a:visited,
    a:active {
      color: var(--link-color);
      text-decoration: none;
      line-break: anywhere;
    }

    a:hover {
      text-decoration: underline;
    }

    code {
      line-break: anywhere;
    }

    img {
      max-width: 100%;
    }

    .date {
      font-size: 0.8em;
      color: var(--foreground-secondary-color);
    }

    .content {
      margin: 0px 0 0 0;
      line-height: 160%;
      font-size: 1em;
      color: var(--foreground-color);
    }

    p:first-child,
    ul:first-child,
    ol:first-child,
    h1:first-child,
    h2:first-child {
      margin-top: 0;
    }

    ul:has(input[type="checkbox"]) {
      padding-inline-start: 0px;
    }

    li:has(input[type="checkbox"]) {
      list-style-type: none;
      margin-left: 0px;
    }

    /* start: table */

    .content table {
      table-layout: auto;
      width: 100%;
      padding: 0;
      border-collapse: collapse;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02),
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.02),
        0 8px 16px rgba(0, 0, 0, 0.02);
    }

    .content table tr {
      border-top: 1px solid var(--border-color);
      background-color: var(--background-color);
      margin: 0;
      padding: 0;
    }

    .content table tr:nth-child(2n) {
      background-color: var(--code-background-color);
    }

    .content table tr th {
      font-weight: bold;
      border: 1px solid var(--border-color);
      margin: 0;
      padding: 6px 12px;
      background-color: var(--code-background-color);
    }

    .content table tr td {
      border: 1px solid var(--border-color);
      margin: 0;
      padding: 6px 12px;
    }

    .content table tr th :first-child,
    .content table tr td :first-child {
      margin-top: 0;
    }

    .content table tr th :last-child,
    .content table tr td :last-child {
      margin-bottom: 0;
    }

    /* end: table */
  </style>
  <script>
    document.addEventListener("DOMContentLoaded", () => {
      let pos = JSON.parse(localStorage.getItem('scrollpos'));
      if (pos) {
        window.scrollTo(0, pos);
      }
    });
    function scrollPosition(positionPercent) {
      window.scrollTo(0, document.body.scrollHeight * positionPercent);
      localStorage.setItem('scrollpos', JSON.stringify(window.scrollY));
    }
  </script>
</head>

<body>
  <div class="content">
    {{ content_html }}
  </div>
</body>

</html>
